package com.syezon.wifikey.wifi.receiver;

import android.net.NetworkInfo;
import android.net.wifi.WifiInfo;

/**
 * Created by Administrator on 2018/5/17.
 */

public class SimpleConnectChangeObserver implements ConnectChangeObserver {
    @Override
    public void onConnectedChange(NetworkInfo.DetailedState state, NetworkInfo wifiInfo , String ssid) {
        switch (state) {
            case IDLE:
                onStateIDLE();
                break;
            case SCANNING:
                onStateSCANNING();
                break;
            case DISCONNECTING:
                onStateDISCONNECTING();
                break;
            case DISCONNECTED:
                onStateDISCONNECTED();
                break;
            case FAILED:
                onStateFAILED();
                break;
            case BLOCKED:
                onStateBLOCKED();
                break;
            case CONNECTING:
                onStateCONNECTING();
                break;
            case AUTHENTICATING:
                onStateAUTHENTICATING();
                break;
            case OBTAINING_IPADDR:
                onStateOBTAINING_IPADDR();
                break;
            case CONNECTED:
                onStateCONNECTED(wifiInfo , ssid);
                break;
            case SUSPENDED:
                onStateSUSPENDED();
                break;
            default:
                onStateIDLE();
        }
    }

    @Override
    public void onConnected(NetworkInfo wifiInfo , String ssid) {

    }

    @Override
    public void onDisConnected() {

    }

    public void onStateIDLE() {
    }

    public void onStateSCANNING() {
    }

    public void onStateDISCONNECTING() {
    }

    public void onStateDISCONNECTED() {
    }

    public void onStateFAILED() {
    }

    public void onStateBLOCKED() {
    }

    public void onStateCONNECTING() {
    }

    public void onStateAUTHENTICATING() {
    }

    public void onStateOBTAINING_IPADDR() {
    }

    public void onStateCONNECTED(NetworkInfo wifiInfo , String ssid) {
    }

    public void onStateSUSPENDED() {
    }
}